#ifndef QZODIAC_H
#define QZODIAC_H


#include <QtCore/QString>
#include <QtCore/QDate>
#include <QtCore/QList>


/**
 * This class contains all zodiac data
 *
 * @author gonwan(gonwan@gmail.com)
 * @version 1.0
 */
class QZodiac
{
public:
    /**
     * Enum to give the index to the zodiac list
     */
    enum ZodiacIndex {
        Aries = 0,
        Taurus,
        Gemini,
        Cancer,
        Leo,
        Virgo,
        Libra,
        Scorpio,
        Sagittarius,
        Capricorn,
        Aquarius,
        Pisces
    };
    /**
     * This function gets the english name
     * @return The english name
     */
    QString name() const;
    /**
     * This function gets the chinese name
     * @return The chinese name
     */
    QString nameCN() const;
    /**
     * This function gets the begin date
     * @return The begin date
     */
    QDate begin() const;
    /**
     * This function gets the end date
     * @return The end date
     */
    QDate end() const;
    /**
     * This function gets the string representation
     * @return The returned string
     */
    QString toString() const;
    /**
     * This function gets all zodiac instance in a list
     * @return The returned list
     */
    static QList<QZodiac> allInstance();

private:
    /**
     * Constructor
     * @param strName The english name
     * @param strNameCN The chinese name
     * @param dtBegin The begin date
     * @param dtEnd The end date
     */
    QZodiac(/*in*/ const QString &strName,
        /*in*/ const QString &strNameCN, /*in*/ const QDate &dtBegin, /*in*/ const QDate &dtEnd);
    /** The english name */
    QString m_strName;
    /** The chinese name */
    QString m_strNameCN;
    /** The begin date */
    QDate m_dtBegin;
    /** The end date */
    QDate m_dtEnd;
    /** The list contains all zodia instance, for cache use */
    static QList<QZodiac> m_zodiacList;

};


#endif
